import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Inicio here.
 * 
 * @author (Fco Fernando Gosch Acosta) 
 * @version (1.0)
 */
public class Inicio extends World
{
    GreenfootSound inicio = new GreenfootSound("inicio.wav");
    /**
     * Constructor for objects of class Inicio.
     * 
     */
    public Inicio()
    {    
        // Create a new world with 600x400 cells with a cell size of 1x1 pixels.
        super(800, 550, 1); 

        prepare();
    }

    public void stopped()
    {
        inicio.pause();
    }

    public void act()
    {
        inicio.playLoop();
        inicio.setVolume(50);
        
    }
    
    public void pausaMusica()
    {
        inicio.stop();
    }

    /**
     * Prepare the world for the start of the program. That is: create the initial
     * objects and add them to the world.
     */
    private void prepare()
    {
        Credits credits = new Credits();
        addObject(credits, 443, 396);
        Jugar jugar = new Jugar();
        addObject(jugar, 468, 125);        
        Record record = new Record();
        addObject(record, 276, 270);
        Ayudam ayudam = new Ayudam();
        addObject(ayudam, 629, 252);
      
    }
}
